//package com.onepiece.im.task;
//
//import com.onepiece.shipelves.common.utils.CacheUtil;
//import com.onepiece.cache.service.CacheService;
//import com.onepiece.im.api.ChatServerService;
//import com.onepiece.im.api.IMUserCommonService;
//import com.onepiece.im.api.UserOnlineServerService;
//import com.onepiece.xxl.LogService;
//import com.xxl.job.core.biz.model.ReturnT;
//import com.xxl.job.core.handler.IJobHandler;
//import com.xxl.job.core.handler.annotation.JobHandler;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//
//import java.util.Set;
//
///**
// *
//*  删除所有登入服务和用户，用于当系统出现不可知错误的时候，把系统重置到没有用户登入的状态
// * 最好不要使用
// */
//@JobHandler("clearAllLoginUserTask")
//@Component
//public class ClearAllLoginUserTask extends IJobHandler {
//
//
//    @Autowired
//    LogService logger;
//
//    @Autowired
//    CacheService cache;
//
//    @Autowired
//    IMUserCommonService imUserService;
//
//    @Autowired
//    ChatServerService chatServerService;
//
//    @Autowired
//    UserOnlineServerService userOnlineServerService;
//
//    @Override
//    public ReturnT<String> execute(String param) throws Exception {
//
//        //删除chatserver表，onlineuser表和redis每个用户的tokenserver中的内容
//        boolean isSuccess = chatServerService.deleteAllServer();
//        isSuccess = userOnlineServerService.deleteAllUser();
//
//        Set<String> stringSet = cache.clear(CacheUtil.IM_USER_TOKEN_CHATSERVER_LIST + "*");
//
//        return SUCCESS;
//    }
//}
